package mysql

import "gorm.io/gorm"

type Products struct {
	gorm.Model
	Nums     string  `json:"nums" gorm:"type:varchar(20);not null;comment:'产品编号'"`
	Name     string  `json:"name" gorm:"type:varchar(30);not null;comment:'产品名称'"`
	Price    float64 `json:"price" gorm:"type:decimal(10,2);not null;comment:'市场价格'"`
	OldPrice float64 `json:"oldPrice" gorm:"type:decimal(10,2);not null;comment:'成本价格'"`
	Image    string  `json:"image" gorm:"varchar(255);not null;comment:'图片'"`
	Intro    string  `json:"intro" gorm:"varchar(255);not null;comment:'商品描述'"`
	UserId   int     `json:"userId" gorm:"int(10);not null;comment:'用户id'"`
	Like     int     `json:"like" gorm:"type:int(10);not null;comment:'点赞'"`
}
